package com.lebang.feign;

import com.lebang.feign.fallback.EatEarnedFallback;
import com.lebang.model.RequestUserInfo;
import com.lebang.model.back.Result;
import com.lebangweb.response.JsonData;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author xwj
 */
@FeignClient(name = "wangzhuan-earns", contextId = "wangzhuan-earns-eat", fallback = EatEarnedFallback.class)
public interface EatEarnedFeign {

    /**
     * 获取金币列表--app
     *
     * @return 返回结果
     */
    @ApiOperation("获取金币列表")
    @PostMapping("/eat/list")
    JsonData list(@RequestBody RequestUserInfo request);

    /**
     * 领取吃饭补贴--app
     *
     * @return 返回结果
     */
    @ApiOperation("领取吃饭补贴")
    @PostMapping("/eat/have")
    JsonData have(@RequestBody RequestUserInfo request);

    /**
     * 点击领取金币奖励--app
     *
     * @return 返回结果
     */
    @ApiOperation("点击领取金币奖励")
    @PostMapping("/eat/reward")
    Result<Integer> reward(@RequestBody RequestUserInfo request, @RequestParam(value = "id", required = false) Integer id);


}
